import request from "../utils/request.js";
import {multipleDelete} from "../utils/common.js"

export function remove(row){
    return request.delete("/category/delete",{
        params: {
            ids: row.id
        }
    })
}

export function multipleRemove(row){
    return request.delete("/category/delete",{
        params: {
            ids: multipleDelete(row)
        }
    })
}

export function edit(category){
    return request.put("/category/edit",category)
}

export function add(category){
    return request.post("/category/add",category)
}

export function top(category){
    return request.post("/category/top",category)
}
